package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;


public interface StrategyMongoRepository extends MongoRepository<Strategy,String> {
    List<Strategy> findByCatalogId(String id);

    /**
     * 根据目的地Id查询Strateies
     * @param destId
     * @param of
     * @return
     */
    List<Strategy> findByDestId(String destId, PageRequest of);

    /**
     * 通过目的地名查找攻略列表
     * @param destName
     * @return
     */
    List<Strategy> findByDestName(String destName);
}
